namespace SeataNet.Core.Common
{
    /// <summary>
    /// 事务开始结果
    /// </summary>
    public class BeginResult
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Success { get; set; }
        
        /// <summary>
        /// 全局事务ID
        /// </summary>
        public string? Xid { get; set; }
        
        /// <summary>
        /// 事务ID
        /// </summary>
        public long TransactionId { get; set; }
        
        /// <summary>
        /// 错误消息
        /// </summary>
        public string? Message { get; set; }
    }
    
    /// <summary>
    /// 事务提交结果
    /// </summary>
    public class CommitResult
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Success { get; set; }
        
        /// <summary>
        /// 错误消息
        /// </summary>
        public string? Message { get; set; }
    }
    
    /// <summary>
    /// 事务回滚结果
    /// </summary>
    public class RollbackResult
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Success { get; set; }
        
        /// <summary>
        /// 错误消息
        /// </summary>
        public string? Message { get; set; }
    }
}